package XMLread;
import java.util.ArrayList;

/**
 * This object represents a floor in a building.
 */
public class Floor {
	private int floorID;
	private ArrayList<Hallway> hallways;
	
	/**
	 * Constructor for this floor object.
	 * @param id the ID of this floor
	 */
	public Floor(String id){
		setFloorID(id);
		hallways = new ArrayList<Hallway>();
	}
	
	/**
	 * Constructor for this floor object.
	 */
	public Floor(){
		hallways = new ArrayList<Hallway>();
	}

	/**
	 * Returns the ID of this floor.
	 * @return the ID of this floor.
	 */
	public int getID(){
		return floorID;
	}
	
	/**
	 * Set the ID of this floor.
	 * @param the ID of this floor.
	 */
	public void setFloorID(String id){
		floorID = Integer.valueOf(id);
	}
	
	/**
	 * Returns the list of hallways in this floor.
	 * @return the hallways of this floor.
	 */
	public ArrayList<Hallway> getHallways(){
		return hallways;
	}

	/**
	 * Adds a hallway to the floor.
	 * @param hall the hallway to add to this floor.
	 */
	public void addHallway(Hallway hall) {
		hallways.add(hall);
		
	}
}
